@echo off
chcp 65001 >nul
echo 正在启动单摆实验平台...

echo.
echo 1. 启动后端服务器...
cd /d "%~dp0"
start "后端服务器" cmd /k "python Z_Project12。2_整理\__main__.py"

echo.
echo 2. 等待后端启动...
timeout /t 3 /nobreak >nul

echo.
echo 3. 启动前端服务器...
cd /d "%~dp0web集成"
start "前端服务器" cmd /k "python -m http.server 8080"

echo.
echo 4. 等待前端启动...
timeout /t 2 /nobreak >nul

echo.
echo 启动完成！
echo 后端地址: http://127.0.0.1:5000
echo 前端地址: http://127.0.0.1:8080
echo.
echo 正在自动打开浏览器...
start http://127.0.0.1:8080

echo.
pause 